#ifndef __DEVICE_H
#define __DEVICE_H

#include <initguid.h>

DEFINE_GUID(GUID_DEVINTERFACE_USBApp,
	0x88bae032, 0x5a81, 0x49f0, 0xbc, 0x3d, 0xa4, 0xff, 0x13, 0x82, 0x16, 0xd6);

	typedef struct _DEVICE_DATA {
		BOOL		HandlesOpen;
		WINUSB_INTERFACE_HANDLE WinusbHandle;
		HANDLE		DeviceHandle;
		TCHAR		DevicePath[MAX_PATH];
	} DEVICE_DATA, *PDEVICE_DATA;

	typedef struct _PIPE_ID {
		UCHAR PipeInId;
		UCHAR PipeOutId;
	} PIPE_ID, *PPIPE_ID;

	HRESULT OpenDevice(
		_Out_			PDEVICE_DATA DeviceData,
		_Out_opt_		PBOOL		 FailureDeviceNotFound
		);

	VOID CloseDevice(
		_Inout_			PDEVICE_DATA DeviceData
		);

#endif
